package com.yuhao.init.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName wallpaperclassify
 */
@TableName(value ="wallpaperclassify")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class WallPaperClassify implements Serializable {
    /**
     * 壁纸分类id
     */
    @TableId(type = IdType.ASSIGN_ID, value = "_id")
    private Long _id;

    /**
     * 壁纸分类名称
     */
    private String name;

    /**
     * 排序字段
     */
    private Integer sort;

    /**
     * 缩略图
     */
    private String picurl;

    /**
     * 是否为推荐
     */
    private Integer recommend;
    /**
     * 创建时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     *更新时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}